<template>
	<view>
		 <map style="width: 100%; height: 750px;"
		  scale=17
		 :latitude="latitude" 
		 :longitude="longitude" :markers="covers">
		 </map>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude: 39.909,
				longitude: 116.39742,
				covers:[]
			}
		},
		onLoad(e) {
			debugger;
			console.log(JSON.parse(e.locationMapObj));
			let locationMap = JSON.parse(e.locationMapObj);
			console.log(locationMap.location);
			this.latitude = locationMap.location.lat;
			this.longitude = locationMap.location.lng;
			this.covers.push({
					latitude: this.latitude,
					longitude: this.longitude,
					iconPath: '../../static/img/icon-location.png'
			})
			
			// this.latitude = locationMap.result.location.lat;
			// this.longitude = locationMap.result.location.lng;
			// this.covers.push({
			// 		latitude: this.latitude,
			// 		longitude: this.longitude,
			// 		iconPath: '../../static/img/icon-location.png'
			// })
		
			
			
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
